# File Managed by Puppet

<VirtualHost *:80>
    ServerAdmin webmaster@<%= name %>
    DocumentRoot <%= real_documentroot %>
    ServerName <%= name %>
<% if aliases != "" -%>
<% if aliases.is_a? Array -%>
    ServerAlias <% aliases.each do |name| -%> <%= name %><% end %>
<% else -%>
    ServerAlias <%= aliases %> 
<% end -%>
<% end -%>
<% if env_variables != "" -%>
    <% if env_variables.is_a? Array -%>
        <% env_variables.each do |envvars| -%>
            SetEnv <%= envvars %>
        <% end -%>
    <% end -%>
<% end -%>
    ErrorLog  <%= scope.lookupvar('apache::log_dir')%>/<%= name %>-error_log
    CustomLog <%= scope.lookupvar('apache::log_dir')%>/<%= name %>-access_log common
</VirtualHost>
